Subnautica

Subnautica

View Stats:
Plokie May 22, 2018 @ 3:05pm
Do Fish and other animals despawn?
Just a thought, I managed to catch a Rabbit Ray in my base and was just curious to know if at all they despawn. For example: If I go far away, wait a certain amount of time or exit and save?

Thanks to anyone who replys!
Originally posted by ♥♥♥♥ Goblin:
Creatures do not have collision detection unless they are a certain distance from the player. They will swim through your base / terrain until you get a certain distance to them. So if a fish is ignoring collision and then you walk near it and it is in your base at the time, then collision turns on and the fish becomes stuck, but when you leave the area, collision turns off and the fish swims out as normal.

As far as despawning, I can't say for certain. I have been developing a mod for creature spawns, so I've looked at their code. From what I can tell, any item (including creatures) are either "awake" or "asleep". They are awake when a chunk is loaded and asleep when a chunk is unloaded. Creatures may work a bit different than other items. For example, you can throw a flare in a deep area, then swim away for an hour and come back, and the flare will still be in the same position it was last when you saw it because the game "put it to sleep" and didn't continue to do physics calculations on it while the player wasn't near.

Because this is a unity game, there may be unrelated issues because of how unity handles memory/garbage collection. I have seen in other unity games where objects will disappear (or not disappear when they should) because there were two many resources active on the screen.
< >
Showing 1-9 of 9 comments
Plokie May 22, 2018 @ 3:06pm 
And yes it seems to be swimming in mid-air.
elipod May 22, 2018 @ 4:00pm 
Corpses despawn, living creatures, won't. Maybe, he'll be able to escape when you're far away and chunk is partially loaded. I don't know if fish or base is loaded first, but I had beacons and Seamoth, left on a beach, sink inside terrain when I wasn't looking.

And fact that he's swimming in air, stems from how underwater air filled areas are done in this game - they don't exist. Instead, each creature decides for itself if it's in water or in air. Various hatches and gates change that state for player when he passes trough, but if you ever glitch or wrap trough wall, you might find yourself in wrong state of existence
Myst?c May 22, 2018 @ 6:10pm 
Originally posted by elipod:
Corpses despawn, living creatures, won't. Maybe, he'll be able to escape when you're far away and chunk is partially loaded. I don't know if fish or base is loaded first, but I had beacons and Seamoth, left on a beach, sink inside terrain when I wasn't looking.

And fact that he's swimming in air, stems from how underwater air filled areas are done in this game - they don't exist. Instead, each creature decides for itself if it's in water or in air. Various hatches and gates change that state for player when he passes trough, but if you ever glitch or wrap trough wall, you might find yourself in wrong state of existence
i will haft to argue this with you, as i recently had a fish despawn right in front of me, occured just recently on stream while i was escaping the lost river and back to the surface (one of the creatures in the lost river, dont know the name of it) rare for things to despawn, but they seem to
Plokie May 23, 2018 @ 11:53am 
Ok well the Rabbit Ray has gone but what caused it to go is when I added a room to the building, i guess when you add a room, the entire building refreshes.
piddlefoot May 23, 2018 @ 1:27pm 
None of the fish I caught and put in a fish tank have vanished.

And a nasty critter that went through the forcfield from water into air is stuck in tunnel, and whenever I go back there, hes still stuck in tunnel in air, so......make of that what you will !
The author of this thread has indicated that this post answers the original topic.
Creatures do not have collision detection unless they are a certain distance from the player. They will swim through your base / terrain until you get a certain distance to them. So if a fish is ignoring collision and then you walk near it and it is in your base at the time, then collision turns on and the fish becomes stuck, but when you leave the area, collision turns off and the fish swims out as normal.

As far as despawning, I can't say for certain. I have been developing a mod for creature spawns, so I've looked at their code. From what I can tell, any item (including creatures) are either "awake" or "asleep". They are awake when a chunk is loaded and asleep when a chunk is unloaded. Creatures may work a bit different than other items. For example, you can throw a flare in a deep area, then swim away for an hour and come back, and the flare will still be in the same position it was last when you saw it because the game "put it to sleep" and didn't continue to do physics calculations on it while the player wasn't near.

Because this is a unity game, there may be unrelated issues because of how unity handles memory/garbage collection. I have seen in other unity games where objects will disappear (or not disappear when they should) because there were two many resources active on the screen.
Invader19 May 23, 2018 @ 2:52pm 
I had a peeper stuck in the bottom corner of the lifepod until yesterday when I finally managed to repulsion cannon him out of there. He had been stuck in the wall since I started the game, and obviously I left the lifepod a long time ago.
Plokie May 23, 2018 @ 2:54pm 
Originally posted by ♥♥♥♥ Goblin:
Creatures do not have collision detection unless they are a certain distance from the player. They will swim through your base / terrain until you get a certain distance to them. So if a fish is ignoring collision and then you walk near it and it is in your base at the time, then collision turns on and the fish becomes stuck, but when you leave the area, collision turns off and the fish swims out as normal.

As far as despawning, I can't say for certain. I have been developing a mod for creature spawns, so I've looked at their code. From what I can tell, any item (including creatures) are either "awake" or "asleep". They are awake when a chunk is loaded and asleep when a chunk is unloaded. Creatures may work a bit different than other items. For example, you can throw a flare in a deep area, then swim away for an hour and come back, and the flare will still be in the same position it was last when you saw it because the game "put it to sleep" and didn't continue to do physics calculations on it while the player wasn't near.

Because this is a unity game, there may be unrelated issues because of how unity handles memory/garbage collection. I have seen in other unity games where objects will disappear (or not disappear when they should) because there were two many resources active on the screen.

Thanks! This helped me understand it a lot more now!
miklkit (Banned) May 23, 2018 @ 3:49pm 
Interesting, but it seems that not all creatures are the same.

I have a 3 story tall aquarium in my main base and when I first built it I stocked it with jellyrays and rabbitrays to populate the area around the base. Then they were released around it.

Since then rays, mostly jellyrays, caught between the aquarium and the outer wall and once caught they can not get out. I can see them from a distance in there, leave, quit the game, whatever and when I come back they are still stuck there. They can not be caught and released so the only solution is to kill them.

Yes there are a lot less rays around that base now.
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: May 22, 2018 @ 3:05pm
Posts: 9