GithubHelp home page GithubHelp logo

Comments (3)

aylaylay avatar aylaylay commented on August 12, 2024 1

You shouldn't really be using SetBoneWorldTransform for this, the world transform is the final bone transform and is recomputed every frame by SceneAnimationSystem.

The prefered way is to create bone objects and set the wheel bones to procedural, you can then just rotate the bone object locally.

sbox-dev_A5ipfmZ8ZD.mp4

If for whatever reason you can't or wont create bone objects, you can use SetBoneOverride instead like this:

	[Property] public SkinnedModelRenderer Model { get; set; }
	[Property] public float Yaw { get; set; }

	protected override void OnPreRender()
	{
		base.OnPreRender();

		var tx = Model.Model.GetBoneTransform( 2 );
		tx.Rotation *= Rotation.FromYaw( Yaw );
		Model.SceneModel.SetBoneOverride( 2, tx );
	}

But it's advised to use procedural bones. (Because it's likely we'll stop access to the scene object at some point)

from sbox-issues.

aylaylay avatar aylaylay commented on August 12, 2024

Closing as wont fix - SetBoneWorldTransform is only really there if you're managing a scene model directly, the component is gonna be stomping world transform every frame.

from sbox-issues.

ceitine avatar ceitine commented on August 12, 2024

alright, thanks for letting me know <3

from sbox-issues.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.