Last active
December 15, 2015 04:59
-
-
Save PierrickKoch/5205563 to your computer and use it in GitHub Desktop.
MORSE Builder : add Near sensor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from morse.builder import * | |
| bpymorse.deselect_all() | |
| bpymorse.add_object(type="EMPTY") | |
| bpymorse.add_sensor(type="NEAR") | |
| obj = bpymorse.get_context_object() | |
| sensor = obj.game.sensors[-1] | |
| sensor.name = "Near" | |
| sensor.property = "Graspable" | |
| sensor.distance = 0.10 | |
| sensor.reset_distance = 0.10 | |
| sensor.use_pulse_true_level = True | |
| obj.name = "Hand_Grab.R" | |
| # TODO use the right (good) name here:: | |
| obj.parent = bpymorse.get_object("r_gripper_tool_fr.000") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment