hello, i have questions by importing mesh (ex .glb)
It has quaternion by default so i trans Vector3 ( rotationQuaternion.toEulerAngles() )
it was effective As a result synchronize mesh rotation and camera rotation
than add to responsive move to clicking point (create box and position settings)
I have a problem with this part.
just the camera worked easily, (Vector3.lerp) position to position and any function no problem
but importing mesh is not work to position
i think Vector3.lerp force compete with rotation setting to rendering
can you give me some advice on these
and
Please write a question using translation and basic grammar and tell me if there is something you do not understand.
The function testGlb.rotationQuaternion.toEulerAngles(); probably doesn’t work they way you expect it to work. (line 43 in your playground)
Calling this function will not convert the rotation of the object to euler angles, but will return a new Vector3 with the current quaternion in euler angles. You will need to set it yourself and nullify the quaternion in order for the object’s rotation to be set in euler.
Regarding the position - setting the position of the mesh does work (9the way you use it in line 37), but since you are using a physics engine, the y value changes - it falls down to the ground. I might have misunderstood what doesn’t work, so if you can explain the issue with the position again it would be great!
thanks for replying
Your advice seems to have a meaning do mesh’s has quaternion angle trans to euler angle to do line 44 instead of line 43 But what I can’t do is not solved.
i want know about (line 65 in my playground) it was click to ground then i thinking importing mesh go to click target by method but it was’t go and rollback the first position value
Having said that - mesh pick does work. You are lerping on pointer pick (and on each frame) from the current position (which is updated on each frame) to the target. 10% change on each frame. But this will never get you to the target, because on each frame you are calculating the 10% again, between the current position and the final position, so the 10% keeps getting smaller and smaller, but will always be 10% of the distance.
i know lerping is’t get to Perfect target position so i select to timer is Approximate moving time
but I don’t understand why The model returns to the first position.
line in 65 just work but it it like being stuck on the floor and finish … return position
Unlike model, camera is working
so i will changing the way is nav mash and solve this problem later
hello @roland
i agree with you too so testGlb.quternion angles trans euler angles
and it is track camera.rotation(callback is just one call but it is update tracking)
eventually i think model has to handle 3 calculations
Vector3.Lerp model position → target position
compositive calculations is bring different result
i hypothesize, go to position less than i think position but it is not even
model position is first position rollback
1 + 3 = is proper result
but 1+2+3… what ever? bug by trans rotation? or bug by single thread? if not i did you think a wrong anything
Hello!
I apologize, I didn’t mean it the wrong way! We are all friends here. Maybe I am to honest but I believe honesty leads to solutions much more quicker. Peace!
@11128
Hey dude! I hope I didn’t offend you! I swear it was friendly “terrible”, however I am sorry, please don’t take it to your heart! We are different in feelings. However maybe you are just on vacation
Whatever, please use a translator so I can understand your needs or it will be a good idea to post a video with an existing game where the plane behaves like you want yours.
hello @roland
sorry for the late reply because I had to finish other urgent project
I know you didn’t mean to be offensive
rather thanks for the reply,so are @DarraghBurke i’m using using Google Translate
but it is Not perfect except for general grammar even though applied it
back to the point I checked my PG again. but it is A horribly different kind of error occurred
So, I’ll fix it again in the near future. after that I will be more precise about this.