gestures


cocos3d billboard paning with gestures


I want to pan the billboard using using gestures how can i do that, i have modified the DemoMashUp like this:
- (void)dragBy: (CGPoint) aMovement atVelocity: (CGPoint) aVelocity
{
if (selectedNode == dieCube || selectedNode == texCubeSpinner) {
[self rotate: ((SpinningNode*)selectedNode) fromSwipeVelocity: aVelocity];
}
if (selectedNode==marker) {
[self moveSelectedNode:marker fromSwipeMovement:aMovement];
}
}
- (void)stopDragging
{
selectedNode = nil;
}
- (void)moveSelectedNode:(CC3Billboard*) aNode fromSwipeMovement: (CGPoint) swipeMovement
{
aNode.location=cc3v(swipeMovement.x, swipeMovement.y, aNode.location.z);
}
but its not working and when i touch the billboard it disapears
i made a new method moveSelectedNode "DemoMashUpScene" like this :
-(void) touchEvent: (uint) touchType at: (CGPoint) touchPoint {
NSLog(#"\n\n*******************TOUCH EVEN CALLED************************\n\n");
switch (touchType) {
case kCCTouchBegan:
[self pickNodeFromTouchEvent: touchType at: touchPoint];
break;
case kCCTouchMoved:
if (selectedNode==marker||selectedNode==marker1||selectedNode==marker2||selectedNode==marker3||selectedNode==marker4||selectedNode==marker5)
{
[self moveSelectedNode:marker1 fromSwipeMovement:touchPoint];
}
break;
case kCCTouchEnded:
selectedNode = nil;
break;
default:
break;
}
lastTouchEventPoint = touchPoint;
lastTouchEventTime = now;
}
-(void) moveSelectedNode: (CC3Billboard*) aNode fromSwipeMovement: (CGPoint) swipeMovement {
CC3Vector vector= CC3VectorMake(swipeMovement.x * 3, swipeMovement.y * 3, 0);
aNode.location=cc3v(aNode.location.x, aNode.location.y, 0.0);
aNode.location=CC3VectorAdd(aNode.location,vector);
CCLOG(#"%#",aNode.name);
// NSLog(#"\n\n ******MOVING****%f_____%f*****____%f",vector.x,vector.y,vector.z);
}

Related Links

Ionic mobile app - disabling gestures in an area on iPad2
Can't get pinch zoom and rotate gestures working on a container in Nativescript
How to Stop Single Tap From firing before Double Tap
Microsoft Kinect SDK Zoom/Scroll getsures
cocos3d billboard paning with gestures

Categories

HOME
firebase
protocol-buffers
lambda
exchange-server
kivy
informatica
mongoid
mirc
moodle-api
fedora
position
gprs
tweepy
phpseclib
nsstring
clish
bootstrap-switch
responsivevoice
createjs
xbox360
fresco
rest-assured
pygobject
l20n
fosuserbundle
google-sites
nullreferenceexception
opam
libgit2
weex
liferay-6.2
perfino
restier
microprocessors
splunk-query
docx4j
vcenter
microsoft-certifications
xll
llvm-ir
reset
microkernel
right-click
utf
minikube
rightnow-crm
roracle
freshdesk
dtd
emacs25
kendo-treeview
cognos-tm1
google-shopping-api
oracle-fusion-apps
cocoa-bindings
jtag
eclemma
jemdoc
mnesia
boost-proto
in-app-billing
mousehover
ambiguity
wlanapi
alwayson
debug-symbols
uno
password-recovery
jquery-mobile-flipswitch
ecos
maven-central
roxy-fileman
disjoint-union
chartfx
linkbutton
nsmutablestring
chronometer
pageheap
kolite
infopath-2007
glassfish-esb
haiku
net-use
botnet
printqueue
ninject-interception
outlook-2007-addin
cleartype
jboss-mdb

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App