2Dry
|
  |
| Joined: 09 Oct 2010 |
| Total Posts: 11489 |
|
| |
|
amanda
|
  |
| Joined: 21 Nov 2006 |
| Total Posts: 5925 |
|
|
| 01 Sep 2016 09:20 AM |
| If you wanted it to actually interact with the water, you could change the fish's density based on the level you want it to be at. |
|
|
| Report Abuse |
|
|
2Dry
|
  |
| Joined: 09 Oct 2010 |
| Total Posts: 11489 |
|
|
| 01 Sep 2016 09:28 AM |
^ I just want it to move around in ROBLOX water, without floating :l
|
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Sep 2016 10:45 AM |
| use force to move it and change the density for it to swim up or down... |
|
|
| Report Abuse |
|
|
zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
| |
|
badfitz60
|
  |
| Joined: 03 Sep 2010 |
| Total Posts: 1283 |
|
|
| 01 Sep 2016 10:48 AM |
Recode it.
All these questions have driven me into existential angst and I find myself beginning to question myself and my motives |
|
|
| Report Abuse |
|
|
CptBenge
|
  |
| Joined: 22 Jun 2012 |
| Total Posts: 823 |
|
|
| 01 Sep 2016 11:00 AM |
| Suggest using path-finding and like they said low the density. |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2016 11:01 AM |
why do you need pathfinding in an ocean it's wide open
there's no path to find
either use bodymovers with the right amount of force so that the fish doesn't float to the top (you can also use density), or cframe the fish |
|
|
| Report Abuse |
|
|
CptBenge
|
  |
| Joined: 22 Jun 2012 |
| Total Posts: 823 |
|
|
| 01 Sep 2016 11:13 AM |
| Either path finding or ray casting to spread the fish out or keep them within boundaries. More efficient methods. |
|
|
| Report Abuse |
|
|
Afro_Sub
|
  |
| Joined: 16 Jun 2013 |
| Total Posts: 1114 |
|
|
| 01 Sep 2016 12:15 PM |
I would personally just use CFrame
|
|
|
| Report Abuse |
|
|
East98
|
  |
| Joined: 17 Jun 2012 |
| Total Posts: 418 |
|
|
| 01 Sep 2016 01:15 PM |
First set CustomPhysicalProperties to true then set he density of all parts in the fish model to 1. This will make the fish model neither rise nor sink when no other force is acting on it in the roblox water terrain. Then you can use objects from the BodyMovers class to conrtol movement of the fish
--East98 |
|
|
| Report Abuse |
|
|
Wowgnomes
|
  |
| Joined: 27 Sep 2009 |
| Total Posts: 26255 |
|
|
| 01 Sep 2016 01:50 PM |
Bodymovers combined with density would be the best approach imo
|
|
|
| Report Abuse |
|
|
|
| 01 Sep 2016 03:06 PM |
Alright, here's the plan:
Create a ray from just above the fish going downwards every so often (ignore the fish itself in ignore list). If you detect water that means the fish is at the surface, therefore it is not allowed to go any higher (unless you want it to fly or jump out of the water for a bit or something).
The fish's density is set to 1 so it doesn't interact with water, you then move it around using body-gyro to change where it looks, and body.Position (or body velocity/force/anythingelse) to change where it is moving.
You'd probably want it so that when a player gets near the fish it moves out of the way (that's kind of nice) (basically just the reverse way of doing the old AI system - create rays to all players through game.Players:GetChildren then player.Character.HumanoidRootPart, and if they're near then swim away from them)
Good luck mate.
Also: pathfinding on roblox terrain and underwater in an open space? now that's asking for trouble |
|
|
| Report Abuse |
|
|