- Home /
Rotating a wire cube gizmo?
I am making visual representations of the waypoint paths which are randomly generated points within a cube. I want the ability to rotate these pathing node areas and at the same time, have representations of these accurately.
// Draw the node range
var loc = Vector3(toleranceX, 1.0f, toleranceZ);
loc = Quaternion.AngleAxis(transform.rotation.y, Vector3.up) * loc; // this line should rotate the box
Gizmos.color = Color.yellow;
Gizmos.DrawWireCube(transform.position, loc);
I tried rotating the vector about the Y axis to spin the node area but it doesn't seem to work and only shortens the box. So either I am doing something wrong or wireCube gizmos do not support rotation.
Does anyone have any experience?
Your answer
Follow this Question
Related Questions
How do you perform multiple rotations on the same object? - (in a single frame) 0 Answers
Rotating a direction Vector3 by Quaternion 2 Answers
Rotate Vector3 array around a point 1 Answer
Set rotation based on 1,1,1 style vector? How to convert vector3 to quaternion? 1 Answer
Play incorrect animations when is looking in other direction 0 Answers