Notifications
Clear all

[Closed] How to display changing text on surfaces?

Urgent help…

I have plane model flying from a world orgin coordinate (0,0,0) in the workspace to certain coordinate e.g.(500, 255,420). I have a camera view targeted on this plane. I had make a rectangle box with a grey color. This box is suppose to display the coordinates of this plane which is changing from frame to frame just like a textbox in MS word. The display should look like this in white color fonts:

x: 500
y: 255
z: 420

Finally, this box should always appear on the top left hand corner of the camera view which i had tried using link constaint to link the box at a certain distance.

Can anyone help me solve this problem with scripts?

4 Replies

For better understanding put some pictures here

Hi

I don´t know if I understood your question, but I think this may help.

create 3 spline Texts in your scene and name it X , Y , Z

the spline text has a property called .text that you can change it over time

PlanePos = $ObjectPlane.pos

$x.text = (planePos.x)as string
$y.text = (planePos.y)as string
$z.text = (planePos.z)as string

you can put this code in a script controller to make it update everytime you move the airplane.
If you´re using max 9, create some variables in the script controller , if you´re using an older version of max , use dependsOn on the airplane Obj.

put: dependsOn $ObjectPlane before the code !!!

This is a rough picture of wat i am going to create in my 3ds project of a animated airplane. Sorry for the poor visual concept drawing coz it’s drawn in paint…heee:)

The gray box i mention is shown on the top right hand corner displaying the changing cordinates of the areoplane.

Should I draw it as a box or plane? Should I write the scripts in the scale script controller of the aeroplane?

Thanks for all the comments:)

Hi again

When I tested this script, I made a box with a grey material with 100% self ilumination, and the x,y,z coords above it About the scale script controller it´s a good idea, just don´t erase the [1,1,1] in the controller, and put the code I´ve showed you before the [1,1,1].

see ya