How do I only access the expression for the up vectors?

0 favourites
  • 4 posts
From the Asset Store
Add this awesome sound effects to make your visual novel come to life!
  • I've been creating a 3d first person shooter, or a boomer shooter. I need to access the expression for the 3d camera's up vector Without using the action : set camera position. Currently, I am having to use "Self.CameraX" for the camera's position, and "Self.LookX", For the rest of the action. this makes the action Mostly Redundant. The only part of the action I am trying to change is the UP Vectors of the camera. When I have to rotate the camera, there is a delay in the code that makes it jitter HEAVILY. Why isn't there an action expressly for the up vectors of the 3d camera?

  • I think to do this in Construct will be difficult and will rely on mathematical calculations in JavaScript.

  • It’s simple enough to do any kind of math from the event sheet.

    You can access the up vector with the 3dCamera.upX/Y/Z expressions. And only way you can modify the up vector is with the look at action.

    Can you post a screenshot of your events that set the camera? There’s apparently an official example for a fps camera that might be helpful?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You said the set position action, did you mean the look at action?

    The reason you can’t set the up vector directly is it’s related to the forward and right vectors. They all have to be perpendicular from each other.

    What the look at action does is set the forward vector directly, the calculates the right vector from the forward and up vectors, and finally it calculates a new up vector from forward and right so everything is perpendicular.

    The lookat expressions I haven’t used. They seem to relate to the rotate action.

    If it jitters then I’d say post your events. All I use from the 3d camera object is the look at action which updates the up,forward and right expressions immediately.

    So I guess my untested question is do the look at expressions get updated immediately too or is it delayed till things render? Genuinely curious. I know the text.textwidth expression only updates after the text is drawn so maybe something else is happening here.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)