Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - benswinden

Pages: [1]
1
Support / Re: Smoothdamp
« on: August 04, 2013, 04:54:34 pm »
Thanks for the advice guys, i understand now that this isn't a tk2d issue so I appreciate you taking some time to help out.

Neither FixedUpdate or LateUpdate made any difference with the assets moving unfortunately. I also tried using Lerp rather than SmoothDamp however the movement it causes isn't smooth enough for what I need to use it for.

I'm unsure where to start looking on the forums in order to solve this problem since I really don't understand why moving the camera is causing the assets to shake the way they are. Any suggestions would be greatly appreciated.

2
Support / Re: Smoothdamp
« on: August 03, 2013, 08:30:16 pm »
Nope

3
Support / Smoothdamp
« on: August 03, 2013, 07:53:19 pm »
I'm using Vector3.SmoothDamp to do smooth camera movement with a tk2dCamera. As the camera moves, all my sprites jiggle slightly. Can you give any insight into why this is happening and how I can prevent it? Here is the code i'm using to move the camera.

Code: [Select]
Vector3 point = camera.WorldToViewportPoint(targetTransform.position);
Vector3 delta = targetTransform.position - camera.ViewportToWorldPoint(new Vector3(0.5f, 0.5f, point.z)); //(new Vector3(0.5, 0.5, point.z));
Vector3 destination = transform.position + delta;
transform.position = Vector3.SmoothDamp(transform.position, destination, ref velocity, dampTime);

Pages: [1]