Police spikes phyisics

Started by
6 comments, last by Daisy Ontas 9 years, 5 months ago

lets say i wanted to make a police sim type game, how would i make police spikes work with the suspects tyres, what i mean is, when th offcer flicks out the spikes, how would you handle the phsyics to be updated with animated model, i only know physicis with static models, what kind of phyisics would i use?

:)
Advertisement

In this context, what do you mean by "animated model"? What animations are in place that you're concerned about?

To attempt an answer, I imagine that the spike-strip would simply be a trigger object (and not a "solid" physics object) that would produce a temporary change in the velocity, handling characteristics and perhaps other properties of the car that hits it (perhaps via a state change, or perhaps an modifying class aggregated in the "car" object, or some other means); the specifics of this would likely depend on how you've modelled your driving physics, I imagine.

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

In this context, what do you mean by "animated model"? What animations are in place that you're concerned about?

To attempt an answer, I imagine that the spike-strip would simply be a trigger object (and not a "solid" physics object) that would produce a temporary change in the velocity, handling characteristics and perhaps other properties of the car that hits it (perhaps via a state change, or perhaps an modifying class aggregated in the "car" object, or some other means); the specifics of this would likely depend on how you've modelled your driving physics, I imagine.

I agree with Thaumaturge, spikes implementation depends on how you model your car and physics. In order to help you, it would be nice to tell us exactly what language / engine you're using, is it 2D ? (Box2D, Farseer) 3D ? (Havok, Bullet Physics, Newton).

Spikes are better off without a physical presence, in the case of Box2D, they would be implemented as sensors. When colliding with the tires, you can make the car less responsive to input, you can modify the friction of the tires to make them stick more to the ground. I guess there's some tweaking to do here to get the right effect.

We're discussing gameplay mechanics but it seems to me that OP is more concerned by graphics and animation of the tires. We can go as far as implementing it using soft bodies but that would be overkill, I would say fake it : make 2 models or 2 textures for the tires, then change the model (or texture) once a tire hits the spike strip. You can also create a smoke particle system and maybe throw in some sound effects to make it more realistic.

Spikes are better off without a physical presence, in the case of Box2D, they would be implemented as sensors. When colliding with the tires, you can make the car less responsive to input, you can modify the friction of the tires to make them stick more to the ground. I guess there's some tweaking to do here to get the right effect.

We're discussing gameplay mechanics but it seems to me that OP is more concerned by graphics and animation of the tires. We can go as far as implementing it using soft bodies but that would be overkill, I would say fake it : make 2 models or 2 textures for the tires, then change the model (or texture) once a tire hits the spike strip. You can also create a smoke particle system and maybe throw in some sound effects to make it more realistic.

Yes, as Zed said, just check tire collision, and then change the physics of the car itself. Doesn't matter if they're individual spikes, or a spike strip.

You'll essentially just want to pop the tires. If you want to demonstrate that graphically, make the tires sag and wobble, and just animate the rotation with the UVs.

Physically, as Zed said, it sounds correct to increase friction and make it more difficult for the car to handle. Add in some random veering and decrease the responsiveness and acceleration.

you could also play around with the suspension properties to simulate the effects of the flat tire on the smoothness of the ride. So that bumps on the road for example hit the car harder, because the ground now hits the wheel rim directly without the air dampening the impact.

Graphically, depending how much resources you got left, you could exchange the tires / wheel for a new model with softbody physics enabled (or something like that)... or the cheap way would be, let your Wheels sink into the ground a little bit (if you use PhysX wheelcollider for example, just lower the suspension high / pressure a little bit). From a distance, looks almost like a flat tire (of course a very awkward trick... still, it does not cost you anything Performance wise)... you could enhance the look maybe with decals that stay stationary at the lower end of the wheel while the wheel rotates, to kinda "simulate" that the tire is flat (while in truth the lower wheel is just sunk into the ground).

Just some ideas...

anddos, it would help you get better answers if you explain how the spike strips are used in the game (the POV, what physics you have in your game, whether this is to be used in non-interactive animations only...). From your OP it sounded like you were thinking of viewing the car from outside the car, but Gian-Reto seems to describe it from the POV of the driver. Which tells me your question needs clarification.

-- Tom Sloper -- sloperama.com

anddos, it would help you get better answers if you explain how the spike strips are used in the game (the POV, what physics you have in your game, whether this is to be used in non-interactive animations only...). From your OP it sounded like you were thinking of viewing the car from outside the car, but Gian-Reto seems to describe it from the POV of the driver. Which tells me your question needs clarification.

I wanted to make a point you could get away with the cheap trick even from a Third person view, depending on how close the camera is to the car... but good point! I haven't even thought about a First person view.

In a first person view, you can get away with even more, as the wheels are not visible at all.

And even my idea, the way I intended it, would need the camera set up in a certain way... (no point in going cheap on the deflated wheels when your car is consisting of 100'000 polygons, a lot of moving parts, expensive shaders, and the camera is near enough to show all this in full splendour. Then you really need to model the deflated wheel with just as much detail, else it will just look off)

Spikes are better off without a physical presence, in the case of Box2D, they would be implemented as sensors. When colliding with the tires, you can make the car less responsive to input, you can modify the friction of the tires to make them stick more to the ground. I guess there's some tweaking to do here to get the right effect.

We're discussing gameplay mechanics but it seems to me that OP is more concerned by graphics and animation of the tires. We can go as far as implementing it using soft bodies but that would be overkill, I would say fake it : make 2 models or 2 textures for the tires, then change the model (or texture) once a tire hits the spike strip. You can also create a smoke particle system and maybe throw in some sound effects to make it more realistic.

Yes, as Zed said, just check tire collision, and then change the physics of the car itself. Doesn't matter if they're individual spikes, or a spike strip.

You'll essentially just want to pop the tires. If you want to demonstrate that graphically, make the tires sag and wobble, and just animate the rotation with the UVs.

Physically, as Zed said, it sounds correct to increase friction and make it more difficult for the car to handle. Add in some random veering and decrease the responsiveness and acceleration.

Thank you for the suggestions of making cops game.

This topic is closed to new replies.

Advertisement