Search found 157 matches

Re: C# Entity Component System

Are you sure the Player class is inheriting from EntityComponent? The AddComponent method has some generic restrictions, such as the type has to inherit from EntityComponent and the class needs to have a constructor that takes no arguments. You can see the source of the method here.

Re: C# Entity Component System

You don't need to create an Entity class. That should also be impossible since the Entity class is sealed. You only need to create a class that inherits from EntityComponent, like this: using System; using CryEngine; namespace CryEngine.RollingBall { [EntityClass("Player", "Game", null, "User.bmp")]...

Re: C# Entity Component System

The BaseEntity is the class that represented the Entity in C# before 5.3 (if I remember correctly). The BaseEntity class was very confusing, since it was both an Entity and an EntityComponent at the same time. That's why since 5.3 we fully implemented the component system in C#, which caused that th...

Re: Freeze Physics

That should be possible with the following code: var status = new pe_status_dynamics(); Entity.Physics.NativeHandle.GetStatus(status); Vector3 currentVelocity = status.v; Vector3 velocity = new Vector3 (0, 0, currentVelocity.Z); Entity.Physics.Action((Common.pe_action_set_velocity action) => { actio...

Re: Freeze Physics

You could try setting the Velocity to Vector3.Zero. This should cancel all movement received from physics. Example: Entity.Physics.Velocity = Vector3.Zero; This is what I used in the update for Sydewinder that's coming with 5.4 to make it ignore gravity. This doesn't set the AngularVelocity though, ...

Go to advanced search

cron