How to save transform.up/transform.forward/etc. as reference type?
Hi all, when I save transform.up/transform.forward/etc. to a Vector3 variable, I save it as a value type. Is it a way to record these axis as a reference? Because there are some situations where I need that... A quick googling didn't give me any solution. Thanks!
Comment
Answer by MaxGuernseyIII · Dec 04, 2017 at 03:51 AM
Answering the question you strictly asked, you can put it in a class...
public class Vector3Holder {
private readonly Vector3 it;
public Vector3Holder(Vector3 it) {
this.it = it;
}
}
Is that really what you wanted?
Your answer
Follow this Question
Related Questions
Add force forward to a ball using local coordinates doesn't work as I wanted 0 Answers
how to rotate a mesh with GetMouseButton with specific rotation value 2 Answers
3 Axis Camera Rotation 0 Answers
unity detect every time object goes up on y axis 1 Answer
How can I work with the opposite angle? 0 Answers