Jump to content
aurora1-4

Limit falling object speed

Recommended Posts

Hi there,

 

Trying to limit a falling objects speed. Object is empty.

I have already tried limitSpeed and forceSpeed, both of which do not work.

Any ideas?

 

Thanks.

Share this post


Link to post
Share on other sites
4 hours ago, 7erra said:

limitSpeed and forceSpeed are AI related commands, not physics related ones. Try playing around with setVelocityModelspace.

Excellent suggestion.  You would want to setVelocityModelSpace in a loop, where you reduce the negative z value (for example, if the z value for the falling object is -10, then set it to -5 to make it fall 50% slower).

You can also try setMass to set the mass much lower for the falling object.  It may fall slower if lighter (I'm not sure about this though).

Share this post


Link to post
Share on other sites

 

On 1/28/2020 at 11:49 PM, johnnyboy said:

Excellent suggestion.  You would want to setVelocityModelSpace in a loop, where you reduce the negative z value (for example, if the z value for the falling object is -10, then set it to -5 to make it fall 50% slower).

This but remember that falling objects may tumble, better use just setVelocity and probably do it on each frame. 

  • Like 1

Share this post


Link to post
Share on other sites
39 minutes ago, mrcurry said:

on each frame.

on each frame is a bit tricky in MP because not every client switches frames at the exact same time.

Share this post


Link to post
Share on other sites
50 minutes ago, 7erra said:

on each frame is a bit tricky in MP because not every client switches frames at the exact same time.

I would expect just adding the on each handler where to vehicle is local and let the net code sort out the rest would be good enough. I haven't played OnEachFrame and physics much so the stutter may be too nasty, but then again so would any scripted solution in that case. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×