- Home /
How do I make Visualizer Studio modify the value of a property relative to the parent object?
I'm using Visualizer Studio to make game objects react to the music that plays in the level. The Asset is great and has a lot of features, but for my current project it may need a little modification. I have these two orbs on either side of the player that move up and down depending on levels in the music. It looks great when you run in a straight, level line; but I want it to do a little more.
I want the Yposition to change relative to the position of the parent object.
So say I have my player with the two orbs that move. As you run, the orbs will leave a nice path of the song's waveform. However, because of how the Visualizer Studio works, the orbs will stay in the specified Y range of 0-20. How can I change this script, that controls the value of the property being changed, to fit my needs?
case GameObjectProperty.YPosition:
if (gameObject.transform != null)
gameObject.transform.position = new Vector3(gameObject.transform.position.x,
propertyValue,
gameObject.transform.position.z);
I've tried changing the y value in that Vector3 to gameObject.transform.position.y + propertyValue, but that made the orbs just travel upwards into the heavens.
Thanks in advanced for the assistance, if I did a bad job at explaining what I'm looking to accomplish let me know and I'll try to clarify it!
Your answer
Follow this Question
Related Questions
C# trying to move a object 2 Answers
What is wrong with my movement code 1 Answer
Semi Dynamic Shadows 1 Answer
Transform.Position stop? 1 Answer