urho icon indicating copy to clipboard operation
urho copied to clipboard

New API-method in Urho3D

Open esakylli opened this issue 7 years ago • 2 comments

@EgorBo: While you are working with .NET Standard support, could you add this new API-method to the forked Urho3D-version that UrhoSharp uses? ... and then run the binding-tool to get it generated to the C# side ... The code-snippet is for Bullet Physics. I have tested it successfully.

I would really need this in my game. It would make my day :-) (I would do a PR myself if my git-skills were better...)

Constraint.h

public:
    float GetHingeAngle() const;

Constraint.cpp

float Constraint::GetHingeAngle() const
{
    if (!constraint_)
	    return 0.0f;

    if (constraint_->getConstraintType() != HINGE_CONSTRAINT_TYPE)
	    return 0.0f;

    btHingeConstraint* hingeConstraint = static_cast<btHingeConstraint*>(constraint_.Get());
    return hingeConstraint->getHingeAngle() * M_RADTODEG;
}

esakylli avatar Nov 21 '18 10:11 esakylli

@esakylli I can add this specific method but I am not sure I can easily re-run the binder on top of HEAD of Urho3D (mostly because of changes in SDL)

EgorBo avatar Dec 11 '18 19:12 EgorBo

@EgorBo But isn't UrhoSharp using a forked version of Urho3D (from 2017)?

esakylli avatar Dec 12 '18 07:12 esakylli