collide issue?
sonicm3
Member Posts: 141
Im not sure if this is a physics question, or collide issue.
whats the best effective way to stop an actor hitting a block so the actor can climb it or get over it.
Comments
@sonicm3 Stop an actor hitting a block so the actor can climb it or get over it ? Do you mean a moving block thats moving towards an actor and stops when it collides ? Then jump on this block ?
sorry i mean a wall, so actor cannot get over it.
@sonicm3 put a collide behaviour in the actor , collide with wall.
actaully @icebox just while im on this subject of physics.
if i have gravity turned on.
im trying to make a block fall when i touch it, but i thought this would work?
inside the block//
IF overlaps or collides with MAN
do
change attribute
self.physics.movable : TRUE
but it doesnt work.
@sonicm3 its better to control the gravity of each actor by itself with an accelerate behaviour.
Block if overlaps or collides with man
do
accelerate direction 270 (down) and the speed you want
You cant change physics movable during gameplay so this wont work , if you have it set moveable it will stay moveable.
@icebox yea i wasnt sure, i did already try that and doesnt seem to work, when i gravity on the scene, as all my work has been done with gravity.
edit, just tested it and it doesnt seem to work for me, are the only commands for the block only?
im tired n cant seem to work this out.
when i enable movable with gravity off, it works.. argh
@sonicm3 set moveable true when you use accelerate it should work
if i tick the box will it not just fall off the map as soon s i click play?
@sonicm3 thats where you have it collide with the ground
ah right , i think im confused.
so i keep gravity ON and keep movable off.
then what would i put inside the block to make it work. (ive got it working with some triggers and boolean and destroy actor ) but i really want this part to be simple.
@sonicm3 Switch scene gravity off ... turn moveable on for actors that you want to be affected by gravity .
On the actor itself
Accelerate set the direction to 270 and speed to what ever you want.. do some testing
if you want the gravity to apply on a certain condition then create a rule with your condition and on " do " put the accelerate behavior.
it will fall down , so if you want your actor to stand on another actor(block) , put a collide behaviour and let it collide with the block.
the block wouldnt require gravity and it wont move so set its moveable attribute to false.
yea ive done that now, i did it with lots of triggers but as you say, probably easier to turn gravity off on this particular level and use accelerate. Thanks again mate for taking the time to help and advise me.
@sonicm3 You welcome glad i could help