Jump to content

turret heading/pitch rate


fLUnKnhaXYU

Recommended Posts

hello ,

Now I have an issue with the turretShapeData heading and pitch rate while the turretShape is the control object . Any setting other than instantaneous (-1) produces an un-smooth interpolation . It will start slowly then snap to the next position . It does the same whether with an aiturret shape or a turret shape as control object . I've messed around with keyboardTurnSpeed but i don't imagine that that would be correct solution it didnt help anyway . Any idea or suggestion ? thank you

Link to comment
Share on other sites

  • 6 months later...

This reply is only life half a year old, which is like 3 days under modern time rules. Or is that 3 decades? Well either way, if it helps someone...


I'm going to presume you're seeing correction packets (writepacketdata/readpacketdata) which are what's actually causing the stutter. The default turret implementation doesn't properly account for the client-predictive/server-authoritative model control objects work under. In my experience, it's the deeply integrated client-server system of Torque that most people bounce off of, but that's also one of its biggest strengths if you're actually making a multiplayer game.


I was certain I'd posted about this at some point, and indeed if you journey back to the old GarageGames forums here is my fix:


http://www.garagegames.com/community/forums/viewthread/130721


What this does is create a "render" version of the rotation variable and uses that to determine render orientation. This version can be safely modified by client-only code for interpolating between ticks, without altering the actual simulation variable for turret rotation (interpolation doesn't occur on the server, so interpolating the simulation rotation would put client and server out of sync). Follows the same model as every scene object having a separate simulation and render transform to store pos/rot.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...