Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 3D Blocks
  4. Get Properties About Physics Body

Get Properties About Physics Body

Scheduled Pinned Locked Moved 3D Blocks
1 Posts 1 Posters 790 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

    Introduction

    When an object is linked with a physics body, its position, rotation and speed are all controlled by that body. Therefore, we need to use the following reporter block to find out such properties:

    c432dd2c-1d0b-4396-81a2-0870b200e136-image.png

     
    The second input is an optional input. It allows you to specify the name of the object. If it is left blank, the current sprite object’s name will be used.

    The first input is the name of the property to query about:

    • Position: The X/Y/Z positions of the physics body, which is the location of the origin point (the center point) of the physics body.

    • Rotation: The rotation direction around the X/Y/Z axes for the physics body.

    • Speed: The moving speed of the physics body in the X/Y/Z directions.

    • Rotation Speed: the rotation speed around the X/Y/Z axes.

     
     

    Example

    For example, here is a program with a sphere jumping over a static box:

    113d4e01-2ef4-4b2f-bd0a-1454c440ce38-image.png

    We can get the position and speed of the sphere like this:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/fda3492d-40e4-404b-a778-4a3b82320181.gif" width="850" style="border-radius: 5px; border: 1px solid #29622d;">

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode