generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Is there possible to make AI fish move in ROBLOX water?

Previous Thread :: Next Thread 
2Dry is not online. 2Dry
Joined: 09 Oct 2010
Total Posts: 11489
01 Sep 2016 09:16 AM
Or will they just float?


Report Abuse
amanda is not online. 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 is not online. 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
HamilcarMago is not online. HamilcarMago
Joined: 11 Jul 2010
Total Posts: 1094
01 Sep 2016 09:30 AM
CFrame it
Report Abuse
ScripterJohn13 is not online. ScripterJohn13
Joined: 01 Jan 2010
Total Posts: 5658
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 is not online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
01 Sep 2016 10:47 AM
inb4 "Yes."
Report Abuse
badfitz60 is not online. 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 is not online. 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
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
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 is not online. 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 is not online. Afro_Sub
Joined: 16 Jun 2013
Total Posts: 1114
01 Sep 2016 12:15 PM
I would personally just use CFrame


Report Abuse
East98 is not online. 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 is not online. 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
ClassicalGod is not online. ClassicalGod
Joined: 26 Sep 2008
Total Posts: 2842
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image