Search found 12 matches

by PhilipArthurMoore
Mon Jan 28, 2019 4:41 pm
Forum: Questions and Help
Topic: Disable entity
Replies: 1
Views: 459

Disable entity

HELLO
I want to disable/enable entity in Space:
+ if Entity is disabl, it will not be effected by physic
+if Entity is enable, it will be effected by physic
And i dont want to use add/remove entity
How to?
by PhilipArthurMoore
Sat Oct 27, 2018 3:46 am
Forum: Questions and Help
Topic: Remove elastic when free fall
Replies: 3
Views: 913

Re: Remove elastic when free fall

Thanks Norbo, i met the below problem: if i set box is free fall, i get cases: if box set bounciness is 0, land set bounciness is 0, it dont have elastic beween box and land when box collission land if box set bounciness is 1, land set bounciness is 1, it have elastic a little between box and land w...
by PhilipArthurMoore
Fri Oct 26, 2018 10:31 am
Forum: Questions and Help
Topic: Remove elastic when free fall
Replies: 3
Views: 913

Remove elastic when free fall

hello, i have a box entity, it free fall, but when it collision with land, position still always change a little i set bounciness = 0 for both box and land, but i think it still have elastic how to remove elastic when free fall? how to position dont change when collision land? thanks Space.ForceUpda...
by PhilipArthurMoore
Tue Oct 23, 2018 4:55 am
Forum: Questions and Help
Topic: Prediction and Physics
Replies: 8
Views: 1331

Re: Prediction and Physics

thanks Norbo, Thread.sleep is which i only demo about loop in game. When i use Space.Update() with same time setting at client and server, i dont care about frame rate more. Client run 1 frame with 10 fps, so it simulate same with server run 1 frame with 33 fps. So move of entity can be synchronized...
by PhilipArthurMoore
Mon Oct 22, 2018 1:09 pm
Forum: Questions and Help
Topic: Prediction and Physics
Replies: 8
Views: 1331

Re: Prediction and Physics

so if my client have not a fixed fps( because time step at Unity is not fixed, it is based process on Update function ), can i use Space.Update() for both server and client? Example: Client long number = 10; while(true) { Space.Update(); Thread.sleep(number );// if it is Unity, number is not fixed }...
by PhilipArthurMoore
Sun Oct 21, 2018 2:22 am
Forum: Questions and Help
Topic: Prediction and Physics
Replies: 8
Views: 1331

Re: Prediction and Physics

thanks Norbo, i understand client-side prediction model. So if frame rate is 60 fps on client, frame rate is 10 fps on server if client move entity to right 1/60 second, how to server excute move Entity to right 1/60 second? it is reason server use equation: entity.Position += 1/60 second * speed, a...
by PhilipArthurMoore
Sat Oct 20, 2018 1:41 am
Forum: Questions and Help
Topic: Prediction and Physics
Replies: 8
Views: 1331

Re: Prediction and Physics

thanks Norbo, so what will is kind of "correction"? if it is client, so cheater can move player through wall and server can't correct that move because server use bepu physic to check collsion and prevent entity move through wall. in this case server is difficult to use move player by using velocity...
by PhilipArthurMoore
Fri Oct 19, 2018 10:32 am
Forum: Questions and Help
Topic: How to use for a 2D game?
Replies: 2
Views: 696

Re: How to use for a 2D game?

i suggest you should use a 2d engine physics
by PhilipArthurMoore
Fri Oct 19, 2018 8:09 am
Forum: Questions and Help
Topic: Prediction and Physics
Replies: 8
Views: 1331

Prediction and Physics

Hello i am doing a multi player game. Client use client prediction to move player. Client will send a message( contains: pressed time T, sequence number N ) to server after every frame if player keep input( example: right key ) Server will move entity by equation: entity.Position += pressed time T *...
by PhilipArthurMoore
Tue Oct 16, 2018 1:59 am
Forum: Questions and Help
Topic: Set Orientation from other point
Replies: 5
Views: 805

Re: Set Orientation from other point

hello, i maybe see the problem. Orientation is rotate entity around lines( ex: x axis, y axis, AB line, .. ) Rotate function by use AngularVelocity will rotate entity around center point. So to Rotate entity around wiff offset point, can i use entity.CollisionInformation.LocalPosition? if it is true...
by PhilipArthurMoore
Mon Oct 15, 2018 8:32 am
Forum: Questions and Help
Topic: Set Orientation from other point
Replies: 5
Views: 805

Re: Set Orientation from other point

Hello, thanks for help this is my code: var box = new Box(new Vector3(1, 2f, 3), 2f, 0.2f, 0.2f, 0); var position = new Vector( 0, 0, 3.1f); var t = box.Position - position; var t2 = -t; Matrix.CreateTranslation(ref t, out var tran1); var orientation = Matrix.CreateFromAxisAngle(Vector3.Backward, Ma...
by PhilipArthurMoore
Sat Oct 13, 2018 3:55 am
Forum: Questions and Help
Topic: Set Orientation from other point
Replies: 5
Views: 805

Set Orientation from other point

hello,
i have a box and i set orientation but it roate around center point
how to set orientation from other point(ex: first point )
var box = new Box(new Vector3(0, 2f, 3), 2f, 0.2f, 0.2f, 0);
box.Orientation = Quaternion.CreateFromAxisAngle(Vector3.Backward, (float)Math.PI / 6);
thanks