ViRuZGamiing Posted June 10, 2014 Posted June 10, 2014 Hello guys, I've made an object and attached it to an element, I was wondering if I can have something like gravity on detach. So that the element falls and lies on the ground? should I do this with moveObject? Regards Viruz
MIKI785 Posted June 10, 2014 Posted June 10, 2014 Well, what i would do is to detach it then get the ground position using getGroundPosition and move it there. I see that moveObject supports easing, definitely use that. But either way you have a little problem, the object would be half in the ground... so you would need to calculate the height of the object (not sure how to do that..) and divide that by 2 and add it to the end position the object would stop at.
Den. Posted June 10, 2014 Posted June 10, 2014 You can calculate a model's height using the following function: getElementDistanceFromCentreOfMassToBaseOfModel
MTA Team qaisjp Posted June 10, 2014 MTA Team Posted June 10, 2014 Physics cannot be applied to objects at the moment You could try and make a physics object (certain objects have physics inbuilt), make it invisible and attach your object to the physobject. moveObject is useless if you want to interact with it easily.
ViRuZGamiing Posted June 11, 2014 Author Posted June 11, 2014 Can you name me one of those object that would indeed be nice
denny199 Posted June 11, 2014 Posted June 11, 2014 You should use a flower pot (vehicle) id: (594) And then just detach the flower pot with your object attached on it. So you need to attach the vehicle on the moving object and the object which you want to fall on the vehicle, pretty simple.
MIKI785 Posted June 11, 2014 Posted June 11, 2014 Physics cannot be applied to objects at the moment You could try and make a physics object (certain objects have physics inbuilt), make it invisible and attach your object to the physobject. moveObject is useless if you want to interact with it easily. There is a slight problem there, as far as i know the object won't start moving/falling till you touch it. And if he is attaching it just for this purpose i myself would disable collisions for it.. so that wouldn't work. Using vehicle as denny199 said would work, small vehicle like flower pot is gonna do.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now