Slowing objects down in certain areas

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Slowing objects down in certain areas

Postby PJani » Fri Oct 23, 2009 10:35 am

Hy, im trying to create slow down efect when object is going throu tree or bushes.
any idea how to do this?
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: Slowing objects down in certain areas

Postby thedmd » Fri Oct 23, 2009 11:10 am

Yes. You can simply decrease time span. For example:
Code: Select all
NewtonUpdate(myWorld, timeSpan * 0.5f);

Slow down simulation twice. Instead of some weird constant, try to use a curve to simulate slowdowns.
thedmd
 

Re: Slowing objects down in certain areas

Postby JernejL » Fri Oct 23, 2009 12:15 pm

PJani wrote:Hy, im trying to create slow down efect when object is going throu tree or bushes.
any idea how to do this?


Increasing linear and angular dampening while the object is in a bush would work.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Slowing objects down in certain areas

Postby Julio Jerez » Fri Oct 23, 2009 1:40 pm

PJani wrote:Hy, im trying to create slow down efect when object is going throu tree or bushes.
any idea how to do this?


you can put a trigger volume covering teh area, then you can apply some drag when the body in in the volume.
In the trigger volume material callback you can do something as cheap as
BodySetVelocity (BodyGetVelocity().Scakle (0.995))

It does wonders for the prize
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Slowing objects down in certain areas

Postby thedmd » Fri Oct 23, 2009 8:07 pm

Sorry for missleading answer. I didn't understand correctly what you was asking about.
thedmd
 

Re: Slowing objects down in certain areas

Postby PJani » Thu Oct 29, 2009 9:43 am

Thx for help it works like charm :P
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron