3д кола завои  | 
	 
	 
Здравейте ( Вход | Регистрация )
3д кола завои  | 
	 
	 
			
			  16:08:17, 09-October-2010, Saturday
			
				 Коментар
					#1
					
				
			 
		 | 
	|
        	
				
					![]() Новодошъл ![]() Група: Потребител Коментари: 31 Регистриран: 03.10.09 Град: България,Пазарджик Потребител № 1505  | 
       
			
			 
				Искам да попитам в момента само съм направил колата да върви напред и назад , но как да направя да завива реално (смисъл като дам на ляво да завива на ляво)
				
				
				
			 
			
			
					
		 | 
	
| 
			
			 | 
	|
![]()  | 
	
			
			  21:57:00, 09-October-2010, Saturday
			
				 Коментар
					#2
					
				
			 
		 | 
	|
        	
				
					![]() Засмян тъпоъгълник :D Група: Администратор Коментари: 1790 Регистриран: 21.07.08 Град: Това е място, населено с много хора. FPS: 60 Потребител № 1116  | 
       
			
			 
				нещо такова: 
			
			Цитат Realize that rotation and scaling are with respect to the origin of the world, not with respect to the object that is to be drawn. If the object is not at the origin it will also move to a different place, which is not what we want. So to e.g. rotate an object over its own x-axis, we must first translate it to the origin, next rotate it, and finally translate it back to its position. This is what the functions to add transformations are for.  
				
				
				
			The following examples might explain this better. Assume we have a sprite spr that we want to draw at position (100,100,10). We can use the following code to do this { d3d_transform_set_translation(100,100,10); draw_sprite(spr,0,0,0); d3d_transform_set_identity(); } Note that because we use a translation we should now draw the sprite at position (0,0). (This assumes the current instance has a depth of 0! If you are not sure, first set the depth.) If we would use this in our first person shooter we would not see the sprite. The reason is that it is still parallel to the xy-plane. We want to rotate it over 90 degrees along the x-axis (or y-axis). So we need to add a rotation. Remember the order: we must first rotate the sprite and then translate it. So we can use the following code. { d3d_transform_set_identity(); d3d_transform_add_rotation_x(90); d3d_transform_add_translation(100,100,10); draw_sprite(spr,0,0,0); d3d_transform_set_identity(); } -------------------- Цитат Пешо: 4:53:46 Я недейти са карайти тука че да ни ва зашливйъ  | 
	
| 
			
			 | 
	|
 valko   3д кола завои   16:08:17, 09-October-2010, Saturday
 
 яверт   Виж функциите за 3д завъртания - в случая ти трябв...   19:28:56, 09-October-2010, Saturday
 
 valko   Нещо такова ли : 
if ( keyboard_check (vk_left) )...   21:12:36, 09-October-2010, Saturday
 
 P.A.S._BG   Абе аз не че съм големия фропесионалист по 3D щуро...   15:29:23, 19-October-2010, Tuesday
 
 Kумчо Вълчо   Колата се накланя по абсолютно всички оси, защото ...   20:08:10, 20-October-2010, Wednesday
 
 gosholosho   Преди години се опитах да направя 3д игра и си спо...   00:05:05, 01-September-2011, Thursday![]() ![]()  | 
	
| Олекотена версия | Час: 09:42:26, 04.11.25 |