Make it so the player cant knock things around...

BergBoy

23-04-2006 05:22:42

How would I make it so the player cant walk into and knock my world objects around? I still want him to not walk through them, I just dont want him to knock them. For example: I have draggable crates and barrels and other objects but if a player jumps on them he knocks them around. I just want him to land on it. Also, if he walks into them, he knocks them around (defeating the purpose of dragging). I wouldnt mind so much but the player has a massive amount of force when he hits things and completly sends them flying. Its a major impact on my gameplay and any suggestions would be great. Thanks!

praetor

23-04-2006 17:45:06

Use the callbacks to monitor how much force the play moves with. It should be too much. If it isnt the problem is probably with the environment. Friction is too low and the mass of the crates is too small.

BergBoy

02-05-2006 08:26:40

how can I eliminate collisions applying forces completly? as if the crates are solid parts of a world when a player walks into them? (this is for puzzles so a player can jump on top of a crate etc). Any help would be appreciated. i have been trying to write callbacks to null the collision but I still want the player to collide and not pass through an object just I dont want the object to get pushed at all.

Im also going to need the same technology for other solid unmoving objects later (like cars and stuff) so any help would be most awesome

praetor

02-05-2006 14:42:48

static objects have their mass set to 0 (which actually means they have infinite mass).

BergBoy

03-05-2006 08:38:43

ok, so I set mass to 0 then for objects that are static. What about the crates and whatnot? can I implement a callback so players cant knock them around? They are draggable and shootable but I just dont want the player knocking them? is there an easy way to implement the 'effect' of a static object when a player hits an object whilst walking or jumping into them?

(basically I need the objects to have masses because they need to be dragged)