Skip to content

Commit

Permalink
ship collider bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GameEgg committed Jan 22, 2017
1 parent c1f59eb commit c76f64d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Assets/Scripts/Game/ShipUpdator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ void UpdatePosition()
var speed = !_ship.isCharging.value ? _ship.spd :
Mathf.Min(GameConsts.maxShipSpd * GameConsts.chargingMoveSlow, _ship.spd);

var position = transform.position + (transform.rotation * Vector3.right * Time.deltaTime * speed);
transform.position = position;
//_rigidbody.MovePosition(position);
var dp = (transform.rotation * Vector3.right * Time.deltaTime * speed);
Vector2 position = _rigidbody.position + new Vector2(dp.x,dp.y);
//_rigidbody.position = position;
_rigidbody.MovePosition(position);

//var position = transform.position + (_ship.rot * Vector3.right * Time.deltaTime * speed);
//Debug.Log(_body.Position);
Expand Down

0 comments on commit c76f64d

Please sign in to comment.