MCG Rotating Piston
another one that needs video to be watched as a pic can't really illustrate...
ver 1.01: choose to shoot ray for collision from Above or Below
Still ver 1.01: but added Controller version. So there's a Modifier version, it offsets the Mesh. Then there's the Controller version, it controls the Position. Use whatever suits your needs. Note for the Controller version, even tho you can see I can move the piston around freely, after awhile for some unknown reasons, I can't move it around anymore even tho everything is still working fine. You can delete and re-add the controller and it works again...so just be aware.
In 2nd video, you can skip to 1:30 if you've already seen the Modifier version...
ver 1.02: enhanced so it doesn't just work on Z axis.
- Shaft Axis (Local) should be the longest axis of the piston, just check in
- Collision Detection Ray Axis is where the rays are shooting from. Check in
View (or World) mode. The direction follows the Gizmo arrow direction. Most
of the time, there would be 2 hitpoints, use Flip to decide which side of the
wall you want as the contact (hit) point
- The Surface Offset will add an offset to the object in the Shaft Axis
direction, depending which way your...err...shaft is pointing...you may have to
Flip the Effect to get the right effect.
- To rotate a group of Pistons, group them then Rotate, I've tried linking to
a dummy then rotate the dummy but it doesn't seem to work.
- I've found using the Controller is a bit flaky...the Modifier version seems
- Collision detection and be a bit....err...hit and miss...you can try uprez
the collider but even for a dense one...at certain angle it for some reason
doesn't register a hit even tho your collider is as big as a house !!! Just
slightly nudge the collider to a different angle and suddenly it works like
magic...even tho the rez might just be a 1x1x1 box.
- VERY IMPORTANT: your objects must be properly scaled, Pivot centered,