Author Topic: Jeep (or vehicle) unstickifying through impulse along the block face's normal  (Read 1540 times)

I like the idea but this wouldnt work well if the server is lagging.
still not sure why
why would server lag change anything?

still not sure why
why would server lag change anything?

The previous thought proposed by _Rave_
couldn't that be laggy though?

is suggesting that the constant saving and checking of the position variable could cause serious lag if you have a multitude of people-many position variables being saved/checked at the same time.

But still a good idea.  I did this with events on my City RPG a while back with zone events where if they entered one of the large cliff faces, then they would be sent back with setvelocity.

It was a good thought, however.  Maybe what you were going for was a more client-based approach where the position is saved to the client's hardrive, instead of the host's.  This could probably dismiss any lag from the constant saving/checking of the position variable.

And for the OP, what would happen with bricks with no collison, rending, ray casting, or a mix of the three?  Wouldn't the brick area still be there, and if a player tried to drive through an invisibrick, then the same effect would occur on that vehicle as it would if it were to drive through a regular brick with C, R, and R C turned on?

Doing it that way wouldn't cause any lag at all, just a jerking for the client if they get sent back.

If you made it in one function that looped all the vehicles it would lag. If you made it a function on vehicles, with a separate schedule per vehicle, the engine gets time to continue between ticks.

As for detection of invisible bricks, well, you have to specify a different typemask to detect non-raycasting bricks at all.

The real issue is detection that is accurate to the vehicle, since using the bounding box doesn't account for rotation and could detect bricks you're driving NEAR instead of touching. A radius search would do the same thing. The only accurate way would be to raycast along the edges of the 'real' bounding box (ie rotated) which would be more effort than it's worth and would also require every modder to define the offsets of the bounding area for detection in their vehicles (so it wouldn't actually work for most vehicles). The only way that would be even slightly worthwhile would be a regular collision check in the engine, but if you're going to take it that far you'd be better off just updating it so they can't intersect with bricks during movement so the entire issue would be null.

The previous thought proposed by _Rave_
is suggesting that the constant saving and checking of the position variable could cause serious lag if you have a multitude of people-many position variables being saved/checked at the same time.
Yup, that's what I meant.