On Breve 2.5 I just added this code in the iterate function of the controller object: + to iterate: message = "Simulation time: $trans-time". self set-display-text to message at-x -.95 at-y -.95.
Where 'message' is the string I wish to display and 'trans-time' is the name of the variable where I put the current simulation time to display.
set-display-text is the controller function that displays the text on the simulation window on the given x/y coordinates of the screen.
Check out the JointTypeExample demo. That's where I got part of my code including the message display part. See what differences are between your code and the example code. Maybe you'll find out what's wrong.
this is the best video on youtube
nesjake 8 months ago
looks like he had a few to many beers to me
vincentmagician 1 year ago
DURR DURR DURR IM A BIPED
grendelee 1 year ago
lol that is ridiculous
Krahl123 2 years ago
Hi there, nice one..
can you please let me know how you display the "simulation time".
Last time I used Breve 1.xx in 2004, and now when I try to run the same code using Breve 2.5 @ 2.6, the "time" disappeared.
thanks
fuadoth 4 years ago
Hi, thanks for your comment.
On Breve 2.5 I just added this code in the iterate function of the controller object: + to iterate: message = "Simulation time: $trans-time". self set-display-text to message at-x -.95 at-y -.95.
Where 'message' is the string I wish to display and 'trans-time' is the name of the variable where I put the current simulation time to display.
I hope it helps :D
Zemat79 4 years ago
Whoops, the comments formatting ruined the code...
+ to iterate:
message = "Simulation time: $trans-time".
self set-display-text to message at-x -.95 at-y -.95.
Zemat79 4 years ago
thanks Zemat79..
before the line
message = "Simulation time: $trans-time".
should put this line
trans-time = (controller get-time).
who knows, might be useful for someone like me in future.. :D
now, am trying to figure out what does the line
self set-display-text to message at-x -.95 at-y -.95.
means.
(on my simulations, the simulation time is still missing from the display; may be because of the coordinate systems)
fuadoth 4 years ago
BTW, I've added the line
print message.
to see the simulation time on the log window, and it works well; still not on the display.. :(
thanks again
fuadoth 4 years ago
set-display-text is the controller function that displays the text on the simulation window on the given x/y coordinates of the screen.
Check out the JointTypeExample demo. That's where I got part of my code including the message display part. See what differences are between your code and the example code. Maybe you'll find out what's wrong.
Regards!
Zemat79 4 years ago
i think it fel down :D
tahak38 4 years ago
Yeah, right now that's the best it can do :S
Zemat79 4 years ago