My next undertaking is experimenting with some physics bodies/joints. Here’s the description for a touch joint:
“This connection is an elastic joint with specifiable strength and behavior, but since it is impossible to apply infinite forces to the simulation, the dragged object may “lag behind” a rapidly moving touch.”
Can I use this as a basic “elastic rope” between two objects? For example, one object is “Dog_Walker” and the other is “Dog”. I want to tie these two objects together with a flexible leash, basically. When the Dog_Walker moves around the screen, the Dog object trails behind it via the leash. It’s important that the Dog eventually “catches up” with the Dog_Walker, eventually overlapping Dog_Walker if it stops. Of course, the entire scenario won’t work unless I can make the two objects immune from each other in physics (Dog doesn’t actually collide/bounce with Dog_Walker, it’s just leashed to it).
My reason for this functionality is this: in Torque2D, I found this method very effective for creating smooth, fluid motion of an object. In practice, the Dog_Walker is actually an invisible object. When the user touches the screen, the Dog_Walker moves toward that point. What this does to “Dog”, in effect, is make its motion smooth and gradual… if the leading object (Dog_Walker) suddenly turns 90 degrees or even 180 degrees, the following object (Dog) doesn’t make the same abrupt motion… instead, it flows smoothly toward the leading object because of the elastic nature of the joint. It also provides a nice automatic speed-up and slow-down of the Dog, again based on the principle of the elasticity. Since the user doesn’t actually see Dog_Walker on the screen, it makes Dog behave smoothly like a vehicle might behave, accelerating and decelerating naturally.
So is a “touch joint” a possible solution to this?
Thanks!
Brent
[import]uid: 9747 topic_id: 2653 reply_id: 302653[/import]