Saml1er Posted June 13, 2015 Share Posted June 13, 2015 I made a custom sphere object. How do I enable physics? I tried attaching it to vehicle and then I set vehicle's velocity and destroyed it after 1 sec. The object was flying. Then I freezed the object and unfreezed it after 1 sec. The object was again solid ( stuck ). Any idea? I also tried this ( according to wiki ) local obj = createObject ( ... ) setElementVelocity (obj,0,0,0) It didn't work. Also for other games you can use 3ds max collision properties but for gta sa you'll need a col shader and only then you can have collision but its a solid object. I don't want a solid object. I want it to have something like rolling ability like beach ball. Link to comment
Ren_712 Posted June 14, 2015 Share Posted June 14, 2015 I made a custom sphere object. How do I enable physics? I tried attaching it to vehicle and then I set vehicle's velocity and destroyed it after 1 sec. The object was flying. Then I freezed the object and unfreezed it after 1 sec. The object was again solid ( stuck ). Any idea?I also tried this ( according to wiki ) local obj = createObject ( ... ) setElementVelocity (obj,0,0,0) It didn't work. Also for other games you can use 3ds max collision properties but for gta sa you'll need a col shader and only then you can have collision but its a solid object. I don't want a solid object. I want it to have something like rolling ability like beach ball. I don't know if MTA lets you import dynamic objects. You could create basic 'physics' using lua. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight https://wiki.multitheftauto.com/wiki/IsLineOfSightClear https://wiki.multitheftauto.com/wiki/Easing Link to comment
Dealman Posted June 14, 2015 Share Posted June 14, 2015 I remember having a similar issue, and I used the vehicle workaround. I spawned a vehicle and attached the object to it, applied velocity and then destroyed the vehicle. This worked for the orange mine ball thing, it enabled the physics. It didn't awkwardly fly in a straight line. I'd suggest you take a look at that model, maybe you can find something of value? I would assume regular objects have some kind of model flags sort of like vehicles do...? Or maybe you can just replace that model and it'll magically work, who knows Edit: You can download my map "Waterballs" here and check it out yourself how I did it. Link to comment
Saml1er Posted June 14, 2015 Author Share Posted June 14, 2015 I made a custom sphere object. How do I enable physics? I tried attaching it to vehicle and then I set vehicle's velocity and destroyed it after 1 sec. The object was flying. Then I freezed the object and unfreezed it after 1 sec. The object was again solid ( stuck ). Any idea?I also tried this ( according to wiki ) local obj = createObject ( ... ) setElementVelocity (obj,0,0,0) It didn't work. Also for other games you can use 3ds max collision properties but for gta sa you'll need a col shader and only then you can have collision but its a solid object. I don't want a solid object. I want it to have something like rolling ability like beach ball. I don't know if MTA lets you import dynamic objects. You could create basic 'physics' using lua. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight https://wiki.multitheftauto.com/wiki/IsLineOfSightClear https://wiki.multitheftauto.com/wiki/Easing Ye, that's the last option if I don't find a way to fix this problem. I remember having a similar issue, and I used the vehicle workaround.I spawned a vehicle and attached the object to it, applied velocity and then destroyed the vehicle. This worked for the orange mine ball thing, it enabled the physics. It didn't awkwardly fly in a straight line. I'd suggest you take a look at that model, maybe you can find something of value? I would assume regular objects have some kind of model flags sort of like vehicles do...? Or maybe you can just replace that model and it'll magically work, who knows Edit: You can download my map "Waterballs" here and check it out yourself how I did it. Oh thank you. I'll try that. EDIT: @Dealman: Nice map. I'll use it my server if you give me the permission to. As you see. I tried the same thing you did there but the difference is that you're using mta default object and I'm using a custom object. I know this has to do something with collision file. I'll try asking mta team if I can somehow edit collision and make it to work if not then I'll simply do what Ren suggest. btw I imported beachball dff file and then I added col from material editor ( kams script ) then when I right clicked on that object and opened "wire parameters" then it had some more options which were from gta sa so I realized that this thing does not exist in kams script. Link to comment
Dealman Posted June 14, 2015 Share Posted June 14, 2015 Sure, go ahead, I'd rather see it being used than not Also, I'd rather bet the physics is due to some file like the vehicle handling. And not the collision itself. Edit: In Object.dat you have a list of dynamic map objects, beachball and all the barrels are listed in this file. I am assuming that this file would need to be edited in order for you to add custom dynamic map objects. Hopefully this is something they could implement. NameMassTurnMassAirResistanceElasticityPercSubmergedUprootCDMultCDEffSpCDRCamAvExplbeachball1000.050.00.990.000150.00.02.00010 Link to comment
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