Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Is there a way to get CC's to move dynamic objects?

Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 23rd Jun 2011 06:03
I noticed with my CC whenever I push against my sphere (which it should move easily, having a mass or merely 1) it doesn't move at all, I tried setting the CC's mass to an extremely high number, but it seems after the sphere is at rest it just doesn't want to move.

Always program as if the person maintaining your program is a psychopath that knows where you live
Chris Tate
DBPro Master
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 3rd Jul 2011 19:06 Edited at: 3rd Jul 2011 19:13
Greatings CocaCola

The character controller will not force the object in your example. Infact, the Mass property does not exist in the character controller object. It will be your responsibility to control how characters interact with your world; the character controller is a starting point which handles basic collision and movement.

Here is a work around, which might not be the best work around, but it works.

I have simply added a hidden object and set its position to that of the character using the [phy set rigid body position] command.

Note that the mass of the objects in this example have little effect because we are forcing the hidden object into its position; any other dynamic rigid body will be pushed out of the way. If we wanted to consider the mass, we would need adjust the character's position to the result of a physics collision between the two objects; perhaps by getting the hidden object to touch the sphere, check the result, then position the character where the hidden object is sent after the collision. It gets a bit complicated, but such detail would only be necessary if it was an integral part of your game mechanics; sometimes a more simple approach will not ruin the gameplay.

There are other ways to push the object; you may want your object to move with certain constraints. You could add a force to the sphere when it collides with the character; or you could run an object movement or rotation function to move your object along a set path, IE: pushing a lever or forcing a door shut.

Login to post a reply

Server time is: 2019-08-24 23:07:20
Your offset time is: 2019-08-24 23:07:20