App Hub

코드 샘플 세부 정보

Aiming

제출됨
2010-05-26
코드 샘플

Description:

This sample shows how to turn one object to face another. This can be useful for aiming, for example.

Sample Overview

This sample shows how to use trigonometry to make one 2D object aim towards another object as fast as it can. This can be useful when making spotlights, gun turrets, and more.

The function TurnToFace does the hard work in this sample. You can copy it and use it in your game.



All content and source code downloaded from this page are bound to the Microsoft Permissive License (Ms-PL).

다운로드

프레임워크

GS 4.0

프레임워크

GS 4.0

교육 콘텐츠 찾기
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG