and will it work in 2.4
I am making a GTA stile game and i want the charictor to be able to get in the car and drive it
please help
please please please
i’m begging you
First: the answer to your question is simply “no”. The long answer: It can’t be done without Python.
Second: It’s not okay to post repeatedly in your own topic just because no-one has replyed for one minute. One week, maybe. One minute, no.
how is it done in python
changing the parenting isn’t necescary for what you want to do… changing the camera would work just fine.
then you only have to deal with making the character [the interactive one] move to where the vehicle is when you get in and out… in python you can setPosition of the character… and activate show/hiding and stuff
uh how do you know what i need it for?
how do you set to a differnt camera in game part (is it python)
im still curious how to switch parents in python. I would use it in many other projects
hot do you switch parents in realtime? can you now? you didnt used to
I think your only solution is to use p2p constraints in Bullet.
Each constraint point is in object space (local object coords), so if you want a child object to move/rotate with its parent you’ll need three constraint points to lock it so that it won’t rotate locally, and will use the parent’s orientation. Or use only two, for those bumpy rides .
import PhysicsConstraints
# To apply a constraint: posn[] is local to child space
constraint_obj = PhysicsConstraints.createConstraint( child_obj.getPhysicsId(),
parent_obj.getPhysicsId(), 1, posn[0], posn[1], posn[2])
# to remove it
PhysicsConstraints.removeConstraint(constraint_obj.getConstraintId())
I have written dynamic parent tutorial, unfortunately it’s in Slovak, but there is link to demo file arrows.blend that shows how it works. When you play the game, press space to shoot arrows on target.
If you are interested in it, I can translate it to English (maybe during weekend).
I checked out your tutorial, hehe more like looked at the blend. You use a complex method of copy and set pos. I will have to check it out more because my atempts at this caused some unwanted jerkyness. Yours is not jerky at all. thx alot.
still very helpfull. thx
anyone on the camera switching?
Camera switching -
Scene Actuator > Set Camera
haha i guess I should look at all the actuators lol. Thanks though.
Lol, definitely translate it to english, ashsid. Wow, really nice dynamic parenting. It provided decent results even when I made the cube move. Would be better if there was a function to switch it on and off in the GE (pokes Erwin). Please explain the math concept behind mat.py, hehe.
Mind if I use the scripts in any future games I plan to make? Dunno what right now, but I know it’ll be useful later on.
Jason Lin
Mat.py contains simplified matrix and vector operations. In fact it contains 2 errors, which compensate each other. I will update it with corrected version.
Mind if I use the scripts in any future games I plan to make?
Yes, you have my permition to use it.
I have translated my dynamic parenting tutorial to English (far from excelent English). Comments in demo remain in Slovak, but all function and variable names are in English.
I have found wicked error in tutorial and demo regarding proper orientation of parented object. Now they are corrected.
hey thank you very much