Skip to main content
11 events
when toggle format what by license comment
Feb 13, 2023 at 18:47 history edited DMGregory CC BY-SA 4.0
Tagging, title, removing edit heading
Oct 29, 2020 at 8:08 vote accept Ardoos
Oct 28, 2020 at 16:55 answer added DMGregory timeline score: 2
Oct 28, 2020 at 13:23 comment added Ardoos To be honest I didn't think setting height would be such a problem and it was easier for me to calculate it that way. I don't think it's a problem though. Plane is rotated correctly and setting it using transform.localRotation would give the same result.
Oct 28, 2020 at 12:18 comment added Zibelas why are you using transform.rotation and not transform.localRotation?
Oct 28, 2020 at 12:09 history edited Ardoos CC BY-SA 4.0
added 29 characters in body
Oct 28, 2020 at 11:57 comment added Ardoos @Zibelas I updated my question with class snippet. I hope it helps with understanding my issue.
Oct 28, 2020 at 11:57 history edited Ardoos CC BY-SA 4.0
added 2806 characters in body
Oct 28, 2020 at 11:35 comment added Ardoos @Zibelas I'm setting it this way. The targetPosition variable is based on raycast hit. transform.localPosition = Vector3.SmoothDamp (transform.localPosition, targetPosition, ref moveVelocity, moveSmoothTime); The thing is that y axis is height of the object. During move object should be lets say 1 unit above ground. So i want to add this value to targetPosition. Vector3.up won't work correctly as I want to apply this 1 unit based on transform rotation, not global rotation. I though transform.up would work this way, but clearly I'm wrong.
Oct 28, 2020 at 10:56 review First posts
Oct 28, 2020 at 18:44
Oct 28, 2020 at 10:52 history asked Ardoos CC BY-SA 4.0