No announcement yet.

Working out Relative/World Location for Line Trace for Objects

  • Filter
  • Time
  • Show
Clear All
new posts

    Working out Relative/World Location for Line Trace for Objects

    Hi Guys,

    Currently, my project has a camera that can rotate around an object in the centre. I am using the Leap Motion plugin to aim a "line trace for objects". The camera is on a spring arm around the middle object and the hand is always in front of the camera as a component of the camera.

    At the starting location, the line trace works fine, however when the camera has been moved this screws up the location and rotation of the line trace (e.g. when 180 degrees from starting position the left and right/up and down are completely reversed.)

    I think that this is due to the hand location/rotation being relative coordinates to the camera, and using world location/rotation from the camera.

    We are getting the hand coordinates from the

    This is my first time using Unreal so any advice would be appreciated

    I am using 4.7.3 source code on Windows.

    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	314.3 KB
ID:	1150983

    Thanks guys!

    Did you try to combine the rotators of your active camera (getCameraManager-->getWorldRotation)?


      Thanks for the reply, yes this screenshot doesn't show that but I did have the active camera world rotation added to the relative bone position/orientation which gave me the same issue.