- Home /
Question by
witcher101 · Aug 19, 2017 at 01:03 PM ·
transformvector3
spawn forward
I wana spawn explosion forward of char by 5
Vector3 explosionPos = transform.position + ????
Comment
Answer by Destolos · Aug 19, 2017 at 01:12 PM
Vector3 explosionPos = transform.position + transform.forward.normalized * 5;
it return the normalized vector, the vector with length = 1. I'm not sure if the forward vector is already normalized, that is why i took the normalized one, perhaps it is already normalized and you could write only transform.forward
Your answer
Follow this Question
Related Questions
Vector3 sets to different coordinates than specified 1 Answer
Moving by rotation of objects 0 Answers
Get the Vector position of the player object when clicking another object C# 1 Answer
Moving a Platform 1 Answer
Why using = isn´t fast enough for changing Vector3 values from the transform? 2 Answers