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
events
memory
keyboard
weblogic12c
freeradius
facebook-messenger
antd
tcsh
hdfs
fogbugz
linker
capistrano
position
ag-grid
port
wine
yeoman-generator-angular
fireloop
nsstring
phpstorm-2017.1
squirrel-sql
fresco
rest-assured
jest
substring
animated-gif
router
tracing
plyr
ipa
unrar
android-cardview
code-climate
cube
sparkle
region
nsmutablearray
cloudera-manager
pdfminer
jslint
jade4j
xll
spring-restcontroller
optionaldataexception
qvtkwidget
sony-future-lab-n
nothing
scala-breeze
password-hash
visual-format-language
embedded-v8
android-webservice
clrs
1010
case-when
swiperefreshlayout
mpmovieplayercontroller
jpda
tsqlt
eclemma
fiber
node.js-connect
gnucash
exists
urbit
persistent-object-store
enunciate
google-maps-api-2
astropy
screen-orientation
auto-generate
compositetype
alwayson
karma-coverage
webproject
r.java-file
nsmutabledata
htmltidy
findersync
nanomsg
google-hangouts
uno
password-recovery
windows-rt
xhprof
squeezebox
communicate
windows-messages
forceclose
oxygene
mod-perl
windows-taskbar
assetic
meteorite
compiler-flags
saga
yii-booster
void-pointers
asp.net-mvc-3-areas
itunes-sdk
jzmq
platform-independent
autosize
will-paginate
groovy-console
snackjs
botnet
active-record-query
ccl
ccnet-config
ixmldomdocument
android-input-method
getimagesize
dm
google-translator-toolkit
processors
fuzzy-comparison
downcasting
xap
levels

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App