Skip to content

Conversation

@dhextras
Copy link

@dhextras dhextras commented Dec 27, 2024

Steps

  • Write a good description of what your PR does (and WHY it does it).
  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a CHANGELOG entry if your change is non-trivial.
  • Ensure make preflight completes successfully.

Description

Add support for custom angular velocity for prop nodes, providing greater control over bombs and similar objects. It enables smoother, more dynamic motion and expands possibilities for modding.

Usage Example
Below is a simple example to create a prop node with angular velocity & update it:

import bascenev1 as bs

# Create a node with a specified angular velocity
prop_node = bs.newnode(
    "prop",
    attrs={
        "position": (0, 1, 0),
        "angular_velocity": (0.5, 1.0, 0.3),  # Angular velocity (x, y, z)
        "body": "sphere",
        "mesh": bs.getmesh("bomb"),
        "color_texture": bs.gettexture("impact_lit"),
    },
)

# Change angular velocity
prop_node.angular_velocity = (0.3, 0, 0) 

For an extended example, check out the implementation I made in the B Day Plugin

Type of Changes

Type
✨ New feature

Copy link
Collaborator

@EraOSBeta EraOSBeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally can't test this right now; but I think this won't cause any issues for backwards compatibility. I thank you in advance if this gets merged!

@dhextras
Copy link
Author

dhextras commented Jan 1, 2025

@EraOSBeta Appreciate that let's see if it gets merged

@EraOSBeta
Copy link
Collaborator

Just wanted to say that Eric said no to this PR a few months ago due to compatibility issues; but I'll leave it open just in case his opinion changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants