Jump to content

Floating origin system


Recommended Posts

As part of a terrain following module for Pilot Assistant, I have been using the altitude of the terrain in front of the craft to predict the climb rate required to navigate that terrain. This is done via raycasting at an angle decided by the current altitude and speed. For the most part, this all works and has proven reasonably successful. However, every time the floating origin shifts, the raycast behaves as if it strikes a vertical boundary either just before or just after, which the control system interprets as an incoming obstacle and makes a rather abrupt effort to avoid.

1) The GameEvent "onFloatingOriginShift" isn't firing at all under conditions I would expect it to be (200m/s @ 500m over a period of 10 minutes), so while I can tell it happened (from the breaks in engine noise mostly), I can't tell exactly when it happens in code at this stage. I was planning on using this to just ignore the raycast for a few physics frames (if it occurred after rather than before the shift...)

2) If the error in the raycast appears before the floating origin shift (or in the case I'm in now where the event doesn't appear to work), how can I tell that I'm approaching the point where the shift occurs?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...